<?php
/**
 * @package framework
 * @subpackage views
 *
 * @author Philippe Archambault <philippe.archambault@gmail.com>
 * @version 0.1
 * @license http://www.gnu.org/licenses/gpl.html GPL License
 * @copyright Philippe Archambault, 2008
 */
?>
<h1><?php echo __(ucfirst($action).' career'); ?></h1>

<form action="<?php echo $action=='edit' ? get_url('career/edit/'.$career->id): get_url('career/add'); ; ?>" method="post">
  <table class="fieldset" cellpadding="0" cellspacing="0" border="0">
    <tr>
      <td class="label"><label for="career_name"><?php echo __('Name'); ?></label></td>
      <td class="field"><input class="textbox" id="name" maxlength="100" name="career[name]" size="100" type="text" value="<?php echo $career->name; ?>" /></td>
      <td class="help"><?php echo __('Required.'); ?></td>
    </tr>
	
	 <tr>
      <td class="label"><label for="location"><?php echo __('Location'); ?></label></td>
      <td class="field"><input class="textbox" id="address" maxlength="100" name="career[location]" size="100" type="text" value="<?php echo $career->location; ?>" /></td>
      <td class="help"><?php echo __('Required.'); ?></td>
    </tr>
	
	<tr>
      <td class="label"><label for="position_available"><?php echo __('Position Available'); ?></label></td>
      <td class="field"><input class="textbox" id="position_available" maxlength="100" name="career[position_available]" size="100" type="text" value="<?php echo $career->position_available; ?>" /></td>
      <td class="help"><?php echo __('Required.'); ?></td>
    </tr>
	
	<tr>
      <td class="label"><label for="contact_person"><?php echo __('Contact Person'); ?></label></td>
      <td class="field"><input class="textbox" id="contact_person" maxlength="100" name="career[contact_person]" size="100" type="text" value="<?php echo $career->contact_person; ?>" /></td>
      <td class="help"><?php echo __('Required.'); ?></td>
    </tr>
	
	<tr>
      <td class="label"><label for="salary"><?php echo __('Salary'); ?></label></td>
      <td class="field"><input class="textbox" id="salary" maxlength="100" name="career[salary]" size="100" type="text" value="<?php echo $career->salary; ?>" /></td>
      <td class="help"><?php echo __('Required.'); ?></td>
    </tr>
	
	<tr>
      <td class="label"><label for="commission"><?php echo __('Commission'); ?></label></td>
      <td class="field"><input class="textbox" id="commission" maxlength="100" name="career[commission]" size="100" type="text" value="<?php echo $career->commission; ?>" /></td>
      <td class="help"><?php echo __('Required.'); ?></td>
    </tr>
	
	<tr>
      <td class="label"><label for="description"><?php echo __('Description'); ?></label></td>
      <td class="field">
		<textarea class="textbox" cols="40" id="description" name="career[description]" rows="20" style="width: 100%">
			<?php echo htmlentities($career->description, ENT_COMPAT, 'UTF-8'); ?>
		</textarea>
	</td>
	<td class="help">&nbsp;</td>
    </tr>
	
	<tr>
      <td class="label"><label for="share_to_social_site"><?php echo __('Share To Social Site?'); ?></label></td>
      <td class="field">
		<input id="share_to_social_site" name="career[share_to_social_site]" class="checkbox" type="checkbox" <?php if ($career->share_to_social_site) echo ' checked="checked"'; ?>/>
	  </td>
      <td class="help"><?php echo __('Required.'); ?></td>
    </tr>
  </table>

  <p class="buttons">
    <input class="button" name="commit" type="submit" accesskey="s" value="<?php echo __('Save'); ?>" />
    <?php echo __('or'); ?> <a href="<?php echo (AuthUser::hasPermission('administrator')) ? get_url('career') : get_url(); ?>"><?php echo __('Cancel'); ?></a>
  </p>

</form>

<script type="text/javascript">
// <![CDATA[
Field.activate('career_name');
// ]]>
</script>
